package com.example.blogserver;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication(exclude =
		{org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})
public class BlogSystemApplication {


	public static void main(String[] args) {
		SpringApplication.run(BlogSystemApplication.class, args);
	}

	@Bean
	public RestHighLevelClient client() {
		return new RestHighLevelClient(RestClient.builder(
				HttpHost.create("http://192.168.64.128:9200")
		));
	}
}
